package cn.itcast.user.mapper;

import cn.itcast.user.pojo.course;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface cMapper {

    @Insert("insert into course(course,cid,ct,mno,address) values(#{course},#{cid},#{ct},#{mno},#{address})")
    int insertCourse(course course);

    @Update("update course SET cid=#{cid}, ct=#{ct}, address= #{address} WHERE id=#{id};")
    int updateCourse(course course);

//    @Select("select * from user where id = #{id}")
//    course findById(@Param("id") int id);

//    @Select("select * from tb_user where username=#{username.name}")
//    User findById(@Param("username") re username);
////
    @Select("SELECT * FROM `course` ")
    List<course> findBylist(@Param("page") int kid);
//     @Select("SELECT * FROM `course` limit 0,4")
//    List<course> findBylist(@Param("page") int page,int size);

//    @Select("SELECT course,cid,ct,address FROM `course`")

}
